package com.company.biz.user.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.company.user.entity.UserEntity;
import com.company.user.req.*;
import com.company.user.resp.ImportAddStaffListResp;
import com.company.user.resp.UserInfoResp;
import org.springframework.web.multipart.MultipartFile;

public interface UserService extends IService<UserEntity> {

    /**
     * 用户的分页查询
     * @return
     */
    Page<UserInfoResp> getUserListPage(UserListPageReq req,UserEntity user);

    /**
     * 通过登入名 电话号码 邮箱 获取用户
     * @return
     */
    UserEntity getUserByLoginNameOrPhoneOrEmail(String loginNameOrPhoneOrEmail);

    /**
     * 添加员工
     */
    boolean addUser(AddUserReq req,UserEntity user);

    /**
     * 通过excel导入批量添加员工
     */
    ImportAddStaffListResp importAddStaffList(MultipartFile fileAddress);

    /**
     * 通过userId获取员工信息
     */
    UserInfoResp getUserInfoByUserId(GetUserInfoByUserIdReq req, UserEntity user);

    /**
     * 修改用户信息
     * @param req
     * @param user
     */
    boolean updateUserInfoByUserInfo(UpdateUserInfoByUserInfoReq req,UserEntity user);

    /**
     * deleteUserInfoByUserIds
     * @return
     */
    boolean deleteUserInfoByUserIds(DeleteUserInfoByUserIdsReq req, UserEntity user);

    boolean resetPassword(String userId);
}
